{% extends "contest/base.html" %}
{% load i18n %}
{% block extrahead  %}
<!--script type="text/javascript" src="/static/javascript/display-list.js"></script-->
{% endblock %}

{% block title %}
    Ranking of the {{ category_name }} Category
{% endblock %}
{% block content %}

    {% if category %}
    <h3 class="prepend-1"><a href="{% url category category.id %}">{{category.name}}</a></h3>
    <table class="ranking">
        <thead>
            <tr>
				<th class="numbers">{% trans "Ranking" %}</th>
                <th class="numbers">{% trans "Number" %}</th>
                <th class="names">{% trans "Name" %}</th>
                <th class="numbers">{% trans "Score" %}</th>
            </tr>
        </thead>
        <tbody>
            {% for competitor in category.rank_competitors %}
                <tr class="{% cycle 'alt' 'normal' %}">
					<td class="ranking">{{ forloop.counter }}</td>
                    <td class="numbers">{{competitor.number}}</td>
                    <td class="names"><a href="{% url competitor competitor.id %}">
                        {{competitor.name}} {{competitor.surname}}</a></td>
                    <td class="numbers">{{competitor.score}}</td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
    
    {% else %}
        <p>No Ranking for the Category {{ category_name }}</p>
    {% endif %}

{% endblock %}